import request from '../../utils/http'

/**
 * 登录请求
 * @param {登录} params
 * @returns
 */
const loginApi = (params) => {
  return request({
    method: 'POST',
    url: 'api/common/login',
    params,
  })
}

/**
 * 修改用户信息
 * @param {*} data
 * @returns
 */
const getUserApi = (data) => {
  return request({
    method: 'post',
    url: 'api/common/update',
    data,
  })
}

/**
 * 通过账户更新密码
 * @param {*} data
 * @returns
 */
const updatePasswordApi = (params) => {
  return request({
    method: 'post',
    url: 'api/common/updateByAccount',
    params,
  })
}

export { loginApi, getUserApi, updatePasswordApi }
